<?php
namespace app\admin\validate;

use think\Validate;
// session_start();
//|unique:ad,num
class Ad extends Validate
{
    protected $rule = [
                        //表单名,表单里面的字段名
        'num'  =>  'require|number',
        'link'  =>'require',
        'src'  =>'require',
        'thumb_src'  =>'require',
        'miaosu'  =>'require',
    ];
    protected $message  =   [
        'num.require'  => '排序必须填写', 
        'num.number'  => '排序必须为数字', 
        'num.unique'  => '此排序已有图片', 
        'link.require' => '链接必须填写',
        'src.require' => '必须上传图片',
        'thumb_src.require' => '必须上传图片',
        'miaosu.require' => '必须填写描述',

    ];

}